<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* nth中的n表示序号，th表示第几 */
        tr:nth-child(2n) {
            background-color: #a0a0f0;
        }
    </style>
</head>
<body>
    <p>隔行换色，相邻两行颜色不同，方便用户观察</p>
    <table border="1">
        <!-- 表头 -->
        <thead>
            <tr>
                <!-- colspan 和并列，列数是3 -->
                <th colspan="3">学员信息登记表</th>
            </tr>
        </thead>
        <!-- 主体 -->
        <tbody>
            <!-- tr是行 td是单元格 -->
            <tr>
                <td>姓名</td>
                <td>性别</td>
                <td>id</td>
            </tr>
            <tr>
                <td>张飞</td>
                <td>男</td>
                <td>003</td>
            </tr>
            <tr>
                <td>貂蝉</td>
                <td>女</td>
                <td>001</td>
            </tr>
            <tr>
                <td>黄忠</td>
                <td>男</td>
                <td>005</td>
            </tr>
            <tr>
                <td>甄姬</td>
                <td>女</td>
                <td>007</td>
            </tr>
            <tr>
                <td>诸葛亮</td>
                <td>男</td>
                <td>008</td>
            </tr>
            <tr>
                <td>黄月英</td>
                <td>女</td>
                <td>009</td>
            </tr>
            <tr>
                <td>刘备</td>
                <td>男</td>
                <td>002</td>
            </tr>
        </tbody>
    </table>
</body>
</html>